All Functions of Week 2

ordered

{dplyr}

Create an ordered factor

t.test

{stats}

Performs one and two sample t-tests on vectors of data.

prop.test

{stats}

Test of Equal or Given Proportions

table

{base}

Obtain frequency table of a variable/cross-tabulation of two variables

c

{base}

Combine values/vectors into a vector

ifelse

{base}

Return a or b depending on the value of test

cut

{base}

Convert Numeric to Factor

library

{base}

Load an R package

leveneTest

{car}

Computes Levene’s test for homogeneity of variance across groups.

read_dta

{haven}

Read a .dta file (Stata data)

setwd

{base}

Set Working Directory

mutate

{dplyr}

Modify/create a column in a data frame

The end!